package com.free.mini.gateway.config;

import cn.hutool.crypto.asymmetric.RSA;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author dongsufeng
 * @version 4.0
 * @date 2023/8/9 16:41
 */
@Configuration
public class EncryptionConfig {

    @Value("${gateway.key.private}")
    private String privateKey;
    @Value("${gateway.key.public}")
    private String publicKey;

    @Bean
    public RSA ras(){
        return new RSA(privateKey,publicKey);
    }
}
